package cn.com.git.example.common.util.lock;

import java.util.function.Supplier;

/**
 * 调用方式：
 *  LockFactory.builder("KEY",()->{return //TODO });
 * @author zhangzhenfu
 * @Description
 * @date 2020/3/24 9:54
 */
public class LockFactory {

    public static <T> T builder(String key,Supplier<T> sup){
        return new LockContent(key).lock(sup);
    }

}
